import { ElMessage } from 'element-plus'

interface MessageContent {
  message: string
}

export default function setupMessage(app: any) {
  app.config.globalProperties.$message = {
    success: (content: MessageContent['message']) => ElMessage.success(content),
    error: (content: MessageContent['message']) => ElMessage.error(content),
    warning: (content: MessageContent['message']) => ElMessage.warning(content),
    info: (content: MessageContent['message']) => ElMessage.info(content),
  }
}
